<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<div class="body-main">
    <div class="distribPersonel" id="allotBox">
        <table class="add-table">
            <tr>
                <td style="text-align: right;"><span class="form-label">暂停时生产节点：</span></td>
                <td>
                    <div class="layui-input-inline">
                        ${subOrder.currentNodeName}
                    </div>
                </td>
            </tr>
            <tr>
                <td style="text-align: right;"><span class="form-label">流程人员：</span></td>
                <td>
                    <div class="layui-input-inline">
                        ${subOrder.flowUserName}
                        <c:if
                                test="${subOrder.flowUserOrgName !=null && subOrder.flowUserOrgName !=''}">（${subOrder.flowUserOrgName}）</c:if>
                    </div>
                </td>
            </tr>
            <tr>
                <td style="text-align: right;"><span class="required">备注：</span></td>
                <input type="hidden" id="subOrderid" value="${subOrder.id}">
                <td>
                    <div class="layui-input-inline">
                            <textarea class="textarea-style" name="remark" id="content"
                                      style="height: 150px;width: 350px;"
                                      maxlength="500" placeholder="不超过500字符"></textarea>
                    </div>
                    <ul class="data-warp">
                        <li>
                            <a href="javascript:void(0)" class="upload-button" id="upload"></a>
                            <input class="layui-upload-file" type="file" name="file" multiple="" id="annexUpload"
                                   data-type="product" data-fileid="${subOrder.id}">
                            <p>上传附件</p>
                        </li>
                    </ul>
                </td>
            </tr>
        </table>
    </div>
</div>
<script src="${rootUrl}/static/js/zzsc/common/files/annex.js?v=${version}" type="text/javascript"
        charset="utf-8"></script>
<script type="text/javascript">

    /**
     * 关闭当前弹窗
     */
    function closeThisLayer() {
        var index = parent.layer.getFrameIndex(window.name);
        parent.layer.close(index);
    }

    /**
     *恢复办理
     */
    function doResumeOrder() {

        var content = $("#content").val().trim();
        if (content == "") {
            DGG.Warning('请先填写备注！');
            return;
        }
        var obj = {};
        obj.remark = content;
        obj.subOrderId = $("#subOrderid").val();
        DGG.Confire("确认恢复办理吗？", '恢复办理', function () {
            DGG.loading();
            $.ajax({
                url: sysInfo.basePath + '/zzsc/suspended_order/resume_suspend.do',
                data: obj,
                type: "POST",
                dataType: "json",
                success: function (data) {
                    var msg = data.msg;
                    if (msg.indexOf("成功") > -1) {
                        DGG.Succeed('恢复成功!');
                        setTimeout(function () {
                            window.location.reload();
                        }, 1000);

                    } else {
                        DGG.Errors('恢复失败！');
                    }
                }
            });
        }, function () {

        });
    }


    /*  /!**
       * 启用附件上传
       *!/
      function activeUploader() {
          //附件上传功能
          var fileId = $(".upload").attr("fileId")
          dggUploader = $(".upload").dggUploader({
              fileId: fileId,//文件ID
              uploadBaseUrl: uploadBaseUrl,
              showIcon: true
          });

      }*/
</script>
